home *** CD-ROM | disk | FTP | other *** search
/ The World of Computer Software / The World of Computer Software.iso / clipfp.zip / PCX87.PRG < prev    next >
Text File  |  1991-05-24  |  1KB  |  44 lines

  1. * ------------------------------------------------------------------------
  2. * Module.......: PCX87.PRG
  3. * Author.......: Pepijn Smits.
  4. * Date.........: Mar 1991
  5. * Copyright....: (c)1991, Pepijn Smits Software.
  6. * Notes........: Clipper '87 Demo of CLFPCX87 library.
  7. * ------------------------------------------------------------------------
  8. * Assumes VGA or EGA installed.
  9. * [But that could of Course be checked using Expand's EGAthere()/VGAthere()]
  10.  
  11. Parameter PCXfile
  12. Private x
  13.  
  14. ?? "PCX Viewer, Written in Clipper Summer '87 using `Fast' PCX library."
  15. ?
  16. if pcount()=0
  17.     ? 'Usage:   PCX87 <FileName>'
  18.     ? 'Where:   <FileName> is a PCX file. It will then be displayed.'
  19.     ? '         PCX87 only supports VGA 320x200x256, VGA 640x480x16 and'
  20.     ? '         EGA 640x350x16 full screen pictures.'
  21.     ? '         Written by Pepijn Smits.'
  22. else
  23.         if At('.',PCXfile)=0
  24.         PCXfile = PCXfile + '.PCX'
  25.     endif
  26.     save screen
  27.     x = FastPCX(PCXfile)
  28.     do case
  29.         case x = 0        && Displayed OK.
  30.             * - Now in Graph mode, press key to return to DOS.
  31.             inkey(0)
  32.             txtMode()
  33.             restore screen
  34.         case x = 1
  35.             ? 'File Not found.'
  36.         case x = 2
  37.             ? 'Not a PCX file.'
  38.         case x = 3
  39.             ? 'File has unsupported PCX format.'
  40.     endcase
  41. endif
  42. ?
  43. quit
  44.